package com.ge.healthcare.autosc.createrfs.test;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.ge.healthcare.autosc.common.database.dao.IJapanMagnetRuleidLookupDAO;
import com.ge.healthcare.autosc.common.database.pojo.CfgJapanMagnetRuleidLookup;

public class MockJapanMagnetRuleidLookupDAO implements IJapanMagnetRuleidLookupDAO {
    BigDecimal ONE = new BigDecimal(1);
    BigDecimal ZERO = new BigDecimal(0);
    BigDecimal NINE = new BigDecimal(9);
    BigDecimal TWO = new BigDecimal(2);
    private ArrayList<CfgJapanMagnetRuleidLookup> rules;

    public MockJapanMagnetRuleidLookupDAO() {
        super();
        rules = new ArrayList<CfgJapanMagnetRuleidLookup>();
        rules.add(new CfgJapanMagnetRuleidLookup(new BigDecimal(1), "I2 - HePressure Limit", "MACJP001:MM3 VESSEL PRESSURE HIGH", ONE,ZERO,NINE, "AUTOSC", "D", "9999"));
        rules.add(new CfgJapanMagnetRuleidLookup(new BigDecimal(2), "He Vessel Pressure","MACJP011:SHEM VESSEL PRESSURE OUT", ONE,ZERO,NINE, "AUTOSC", "D", "9999"));
        rules.add(new CfgJapanMagnetRuleidLookup(new BigDecimal(3), "I2 - HePressure Low","MACJP002:MM3 VESSEL PRESSURE LOW", ONE,ZERO,NINE, "AUTOSC", "D", "9999"));
        rules.add(new CfgJapanMagnetRuleidLookup(new BigDecimal(4), "I2 - HeLevel Low","MACJP003:MM3 ALERT LHE LEVEL LOW", ONE,ZERO,NINE, "AUTOSC", "D", "9999"));
        rules.add(new CfgJapanMagnetRuleidLookup(new BigDecimal(5), "He Level","MACJP013:SHEM ALERT LHE LEVEL LOW", ONE,ZERO,NINE, "AUTOSC", "D", "9999"));
    }


    @Override
    public List findBySymptom(Object symptom) {
        ArrayList r = new ArrayList<CfgJapanMagnetRuleidLookup>();
        
        for (CfgJapanMagnetRuleidLookup rule : rules) {
            if (rule.getSymptom().equals(symptom)){
                r.add(rule);
            }
        }
        
        return r;
        
    }

    @Override
    public void deleteByID(Object pojo) {
        // TODO Auto-generated method stub
        
    }

    @Override
    public void deleteByProperty(String propertyName, Object value) {
        // TODO Auto-generated method stub
        
    }

    @Override
    public void deleteByProperty(String propertyName, Object value, String tableName) {
        // TODO Auto-generated method stub
        
    }

    @Override
    public List<?> findByProperties(Map<String, Object> whereClause) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public List<?> findByProperty(String propertyName, Object value) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public List<?> findByProperty(String propertyName, Object value, String orderBy) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Object findObjectByID(String propertyName, Object value) {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public void refresh(Object pojo) {
        // TODO Auto-generated method stub
        
    }

    @Override
    public void refreshCache() {
        // TODO Auto-generated method stub
        
    }

    @Override
    public void save(Object pojo) {
        // TODO Auto-generated method stub
        
    }

}
